import React from 'react'
import {get,post} from '../../utils/request'

interface Iparams{
    "type":1,//来访类型 ：1 临时访问登记  2 在校生访问登记
    "username": "李四", 
    "mobile": "1300000000", 
    "card": "12312312312313", 
    "carnumber": "京NB2008", 
    "starttime": "2022-03-30 12:00", 
    "endtime": "2022-03-30 18:00" ,
    "reason":"参观学校",
    "department":"5",//部门
    "travelcode":"1",//行程码
    "healthcode":"1",//健康码
    "nucleicacid":"1", //核酸
    "adduserid":1,// 添加人id 在sessionStorage中获取（登录时存的用户信息）
    "openid":"123123123132123"
}

const Add=<Iparams>(params:Iparams):any=>{
    return post('api/visit/visituser/add',params)
}
export default Add